package com.itheima.excel.pojo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.itheima.excel.coverter.SexConverter;

import java.io.Serializable;

/**
 * @作者 itcast
 * @创建日期 2021/5/2 9:27
 **/
public class UserModel implements Serializable {
    @ExcelProperty(value = "用户名称",converter = SexConverter.class)
    private String name;
    @ExcelProperty(value = "用户年龄")
    private Integer age;
    @ExcelProperty("用户性别")
    private String sex;
    //有参构造
    public UserModel(String name, Integer age, String sex) {
        this.name = name;
        this.age = age;
        this.sex = sex;
    }
    //无参构造
    public UserModel() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Override
    public String toString() {
        return "UserModel{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                '}';
    }
}
